<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
    var arr1 = [123, true, "haha"];//创建一个数组
    console.log(arr1);//获取整个数组的内容
    console.log(arr1[0]);
    console.log(arr1[2]);
    console.log(arr1[true+1]);
    function num(i){
        return ++i;
    }
    console.log(arr1[num(0)]);
    </script>
  </body>
</html>
